/*
** xfunctions3.c for  in /home/gomes_m//svn/tek2/zappy-2016-gomes_m/reseau/server
** 
** Made by mickael gomes
** Login   <gomes_m@epitech.net>
** 
** Started on  Wed Jun 26 15:22:48 2013 mickael gomes
** Last update Tue Jul 30 20:38:39 2013 mickael gomes
*/

#include		<stdio.h>
#include		<sys/resource.h>
#include		<sys/time.h>
#include		<sys/types.h>
#include		<sys/socket.h>
#include		<unistd.h>
#include		<fcntl.h>
#include		"struct.h"
#include		"prototypes.h"

void			xread(int fd, char *buff, int size)
{
  int			len;

  if ((len = read(fd, buff, size)) <= 0)
    {
      printf("len => %d\n", len);
      my_putstr(2, "Read error.\n", 1);
    }
  buff[len] = 0;
}
